{include file="common/head"/}
<div class="main"> 
    <div class="layui-card-header"><i class="layui-icon">&#xe60b;</i>订单信息</div>
    <div class="layui-card-body payinfo">
        <div class="orderid">
            <span class="name">订单号：</span>
            <span class="ordernum">{$order.orderid}</span>
        </div>
         <div class="orderid"><span class="red">提示：您在转款时，请务必备注该订单号。</span>
        </div>
        <div class="orderid">
            <span class="name">支付金：</span> 
            <span class="ordernum">{$order.money}</span><span class="name">元({$order.price}*{$order.number}份)</span>
        </div>
        <div class="orderid">
            <span class="name">产品名：</span> 
            <span class="name">{$order.cionname}</span>
        </div>
        {if $order['name_en']=='Bank'} 
        	<div class="orderid">
	            <span class="name">付款方式：</span> 
	            <span class="name">{$order.name}（{$order.bank_name}）</span>
	        </div>
        	<div class="orderid">
	            <span class="name">收款账号：</span> 
	            <span class="name">{$order.bank_no}（{$order.content}）</span>
	        </div> 
        {else}
        	<div class="orderid">
	            <span class="name">付款方式：</span> 
	            <span class="name">{$order.name}</span>
	        </div>
        	<div class="orderid">
	            <span class="name">收款账号：</span> 
	            <span class="name">{$order.bank_no}（{$order.bank_name}）</span>
	        </div> 
        	<div class="paycode"><div class="picbox"><img src="{$order.qrcode}"></div></div> 
        {/if} 
        <div class="paybot"> 
            <button type="submit" class="layui-btn layui-btn-sm layui-btn-normal" lay-filter="paysub" lay-submit>已完成付款</button>
        </div>
    </div> 
</div> 
<script> 
layui.use(['layer','jquery','form'], function(){
    var $ = layui.jquery,form = layui.form, layer = layui.layer;   
    // 提交监听
    form.on('submit(paysub)', function (data) {
        var loading = layer.load(1, {shade: [0.1, '#fff']});  
        $.post("{:url('')}",{orderid:"{$order.orderid}",appid:"{$order.shopappid}"},function(res){
            layer.close(loading);
            if(res.code===1){
                layer.msg(res.msg,{time:2000,icon:1},function(){  
                    location.href = res.callbackurl;  
                });
            }else{
                layer.msg(res.msg,{time:1000,icon:0}); 
            }
        });
        return false;
    });
});  
</script> 
</body>
</html>